package com.yycwxt.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * Created by Mr.Zhang on 2022/8/26 21:14
 */

@Data
@TableName("core_flows")
public class Flows {

    @TableId(type = IdType.AUTO)
    @PositiveOrZero(message = "必须为正整数")
    private Integer id;

    @NotNull(message = "不能为空")
    @NotBlank(message = "长度不能为0")
    @Size(max = 21, message = "长度不能超过21")
    @ExcelProperty("订单编号")
    private String orderNumber;

    @NotNull(message = "不能为空")
    @ExcelProperty("账期")
    private Integer accountDate;

    @NotNull(message = "不能为空")
    @Size(max = 15, message = "长度不能超过15")
    @ExcelProperty("店铺编码")
    private String shopCode;

    @NotNull(message = "不能为空")
    @NotBlank(message = "长度不能为0")
    @Size(max = 31, message = "长度不能超过31")
    @ExcelProperty("店铺名称")
    private String shopName;

    @NotNull(message = "不能为空")
    @Size(max = 15, message = "长度不能超过15")
    @ExcelProperty("仓库编码")
    private String storeCode;

    @NotNull(message = "不能为空")
    @NotBlank(message = "长度不能为0")
    @Size(max = 31, message = "长度不能超过31")
    @ExcelProperty("仓库名称")
    private String storeName;

    @NotNull(message = "不能为空")
    @Size(max = 18, message = "长度不能超过18")
    @ExcelProperty("科目编码")
    private String subjectCode;

    @NotNull(message = "不能为空")
    @NotBlank(message = "长度不能为0")
    @Size(max = 63, message = "长度不能超过63")
    @ExcelProperty("科目名称")
    private String subjectName;

    @NotNull(message = "不能为空")
    @ExcelProperty("借贷方向")
    private Integer subjectDirection;

    @NotNull(message = "不能为空")
    @ExcelProperty("费用金额")
    private BigDecimal cost;

    @Size(max = 63, message = "长度不能超过63")
    @ExcelProperty("备注")
    private String remark;

    @TableField(insertStrategy = FieldStrategy.NEVER)
    private LocalDateTime created;

    @NotNull(message = "不能为空")
    @Size(max = 63, message = "长度不能超过63")
    @ExcelProperty("输入值")
    private String input;
}
